package com.szrt.java.day20161226.demo07;

import java.util.Scanner;

public class ClassTest {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入第1个想要加的数：");
		double a = sc.nextDouble();
		
		System.out.println("请输入第2个想要加的数：");
		double b = sc.nextDouble();
		
		System.out.println("请输入第3个想要加的数：");
		double c = sc.nextDouble();
		
		sc.close();
		
		double result = add(a,b,c);
		
		System.out.println(a+" + "+b+" + "+c+" = "+result);
		
	}
	
	public static double add(Double a,Double b,Double c){
			
			double result = a+b+c;
			return result;
		}
	
}
